# -*- coding:utf-8 -*-
'''
Created on 2012-7-17

@author: duoyi
'''
import platform,os
#是否更新
#两个为False表示第一次下载，
#True,False表示更新
#False，True表示下载新加进url_queue的链接
S_is_update=False

S_target_website='iteye'                                                        ##
S_website_tables=[S_target_website,'%s_queue'%S_target_website]
#起始页
S_start_urls=['http://www.51cto.com/', ]                                        ##

S_delta_url_prefix='/media/html/delta'
S_main_url_prefix='/media/html/template'

S_white_ext=['',' ','css','js','php','html','htm','asp','aspx','jsp']
S_img_ext=['png','jpg','jpeg','gif']
S_black_ext=[]

_platform_str=platform.platform().lower()
if 'xp' in _platform_str:
    S_root_dir='D:/project/self_twisted_pacong/self_pacong/download_htmls'
else:
    S_root_dir='C:/htmls'

S_log_file=os.path.abspath('.').replace('\\','/')+'/LOG.txt'
    
S_thre_num=6
S_timeout=60

S_decode_list=['utf-8', 'gb2312', 'gbk', 'gb18030', 'cp1252', ]
#csdn
S_csdn_allow_domains=[#'http://forum.csdn.net/',                                ##
                    ]
S_csdn_deny_domains=['http://my.csdn.net',                                      ##
                    'http://hi.csdn.net',
                    'http://download.csdn.net',
                    'http://hui.csdn.net',
                    'http://so.csdn.net',
                    ]
#iteye
S_iteye_allow_domains=[#'http://forum.csdn.net/',
                       ]
S_iteye_deny_domains=['http://www.iteye.com/job',
                      'http://www.iteye.com/search',
                      'http://my.iteye.com',
                      ]
#cnblogs
S_cnblogs_allow_domains=[#'http://forum.csdn.net/',
                       ]
S_cnblogs_deny_domains=['http://home.cnblogs.com',
                      'http://job.cnblogs.com',
                      ]
#51cto
S_n51cto_allow_domains=[#'http://forum.csdn.net/',
                       ]
S_n51cto_deny_domains=['http://down.51cto.com',
                        'http://job.51cto.com',
                        'http://home.51cto.com',
                        'http://blog.51cto.com/tagindex.php',
                        'http://www.51cto.com/php/search.php',
                        'http://selftest.51cto.com',
                        'http://down.51cto.com/',
                        'http://bbs.51cto.com/member.php',
                        'http://bbs.51cto.com/space-uid-',
                        'http://bbs.51cto.com/stats.php',
                        'http://bbs.51cto.com/post.php',
                        'http://bbs.51cto.com/faq.php',
                        'http://bbs.51cto.com/search.php',
                        'http://bbs.51cto.com/misc.php',
                        'http://bbs.51cto.com/attachment.php',
                        'http://www.xianguo.com/subscribe.php',
                        'http://bbs.51cto.com/my.php',
                        'http://t.51cto.com',
                      ]














